private CodexThing _door = new CodexThing(((Codex)this).GetClassThing());
private float _speed = 10.0F;
private CodexThing _door2;
private CodexThing _door3;
private CodexThing _door4;
private CodexThing _door5;
private CodexThing _door6;
private CodexThing _door7;
private CodexThing _door8;
private int _OpenOnce;
private boolean bOpen;
private boolean bActive;
public static String[] _params = new String[]{"Movement speed;10.0", "Open Once;0", "Second part of door", "Third part of door", "Fourth part of door", "Fifth part of door", "Sixth part of door", "Seventh part of door", "Eighth part of door"};
public void clicked(int guid, int clickerGuid, int captureId) {
if (!this.bActive) {
this.bActive = true;
if (!this.bOpen) {
this._door.MoveToFrame(1, this._speed);
if (this._door2 != null) {
this._door2.MoveToFrame(1, this._speed);
}
if (this._door3 != null) {
this._door3.MoveToFrame(1, this._speed);
}
if (this._door4 != null) {
this._door4.MoveToFrame(1, this._speed);
}
if (this._door5 != null) {
this._door5.MoveToFrame(1, this._speed);
}
if (this._door6 != null) {
this._door6.MoveToFrame(1, this._speed);
}
if (this._door7 != null) {
this._door7.MoveToFrame(1, this._speed);
}
if (this._door8 != null) {
this._door8.MoveToFrame(1, this._speed);
}
this.bOpen = true;
} else {
this._door.MoveToFrame(0, this._speed);
if (this._door2 != null) {
this._door2.MoveToFrame(0, this._speed);
}
if (this._door3 != null) {
this._door3.MoveToFrame(0, this._speed);
}
if (this._door4 != null) {
this._door4.MoveToFrame(0, this._speed);
}
if (this._door5 != null) {
this._door5.MoveToFrame(0, this._speed);
}
if (this._door6 != null) {
this._door6.MoveToFrame(0, this._speed);
}
if (this._door7 != null) {
this._door7.MoveToFrame(0, this._speed);
}
if (this._door8 != null) {
this._door8.MoveToFrame(0, this._speed);
}
this.bOpen = false;
}
}
}
public void beginscene(int clientGuid, int captureID) {
this._door.SetThingFlags(8192);
this._door2.SetThingFlags(8192);
this._door3.SetThingFlags(8192);
this._door4.SetThingFlags(8192);
this._door5.SetThingFlags(8192);
this._door6.SetThingFlags(8192);
this._door7.SetThingFlags(8192);
this._door8.SetThingFlags(8192);
}
public void arrived(int thingGuid, int frameNum, int captureId) {
if (this._OpenOnce == 0) {
this.bActive = false;
} else if (this._OpenOnce == 1) {
this._door.SetThingFlags(64);
this._door2.SetThingFlags(64);
this._door3.SetThingFlags(64);
this._door4.SetThingFlags(64);
this._door5.SetThingFlags(64);
this._door6.SetThingFlags(64);
this._door7.SetThingFlags(64);
this._door8.SetThingFlags(64);
}
}
public void restore(int flags) {
this.bOpen = CodexSequence.RestoreBoolean();
}
public void save(int flags) {
CodexSequence.SaveBoolean(this.bOpen);
}
public MultiDoor(float speed, int OpenOnce, CodexThing door2, CodexThing door3, CodexThing door4, CodexThing door5, CodexThing door6, CodexThing door7, CodexThing door8) {
this._door.SetDescriptionID("GEN_DOOR");
this._speed = speed;
this._OpenOnce = OpenOnce;
if (door2 != null) {
this._door2 = new CodexThing(((Codex)door2).GetGUID());
if (this._door2.GetDescriptionID().equalsIgnoreCase("PROP")) {